<?php

use App\Http\Controllers\admin\ReadAssemblyController;
use App\Http\Controllers\admin\ReadDeepenController;
use App\Http\Controllers\admin\ReadDifficultController;
use App\Http\Controllers\admin\ReadDrawingQaController;
use App\Http\Controllers\admin\ReadPrecedeController;
use App\Http\Controllers\admin\ReadProofController;
use App\Http\Controllers\admin\ReadQualityController;
use App\Http\Controllers\admin\ReadSampleController;
use App\Http\Controllers\admin\ReadSubstrateController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::prefix('admin/project/read')->group(function () {
    Route::group(['middleware' => ['auth:admin_api']], function () {
        Route::post('/drawingQA', [ReadDrawingQaController::class, 'index'])->middleware('request.filter');
        Route::put('/drawingQA/batch', [ReadDrawingQaController::class, 'batch'])->middleware('request.filter');
        Route::put('/drawingQA', [ReadDrawingQaController::class, 'store'])->middleware('request.filter');
        Route::patch('/drawingQA', [ReadDrawingQaController::class, 'update'])->middleware('request.filter');
        Route::delete('/drawingQA/{id}', [ReadDrawingQaController::class, 'delete'])->middleware('request.filter');

        Route::post('/substrate', [ReadSubstrateController::class, 'index'])->middleware('request.filter');
        Route::put('/substrate/batch', [ReadSubstrateController::class, 'batch'])->middleware('request.filter');
        Route::put('/substrate', [ReadSubstrateController::class, 'store'])->middleware('request.filter');
        Route::patch('/substrate', [ReadSubstrateController::class, 'update'])->middleware('request.filter');
        Route::delete('/substrate/{id}', [ReadSubstrateController::class, 'delete'])->middleware('request.filter');

        Route::post('/proof', [ReadProofController::class, 'index'])->middleware('request.filter');
        Route::put('/proof/batch', [ReadProofController::class, 'batch'])->middleware('request.filter');
        Route::put('/proof', [ReadProofController::class, 'store'])->middleware('request.filter');
        Route::patch('/proof', [ReadProofController::class, 'update'])->middleware('request.filter');
        Route::delete('/proof/{id}', [ReadProofController::class, 'delete'])->middleware('request.filter');

        Route::post('/sample', [ReadSampleController::class, 'index'])->middleware('request.filter');
        Route::put('/sample/batch', [ReadSampleController::class, 'batch'])->middleware('request.filter');
        Route::put('/sample', [ReadSampleController::class, 'store'])->middleware('request.filter');
        Route::patch('/sample', [ReadSampleController::class, 'update'])->middleware('request.filter');
        Route::delete('/sample/{id}', [ReadSampleController::class, 'delete'])->middleware('request.filter');

        Route::post('/deepen', [ReadDeepenController::class, 'index'])->middleware('request.filter');
        Route::put('/deepen/batch', [ReadDeepenController::class, 'batch'])->middleware('request.filter');
        Route::put('/deepen', [ReadDeepenController::class, 'store'])->middleware('request.filter');
        Route::patch('/deepen', [ReadDeepenController::class, 'update'])->middleware('request.filter');
        Route::delete('/deepen/{id}', [ReadDeepenController::class, 'delete'])->middleware('request.filter');

        Route::post('/difficult', [ReadDifficultController::class, 'index'])->middleware('request.filter');
        Route::put('/difficult/batch', [ReadDifficultController::class, 'batch'])->middleware('request.filter');
        Route::put('/difficult', [ReadDifficultController::class, 'store'])->middleware('request.filter');
        Route::patch('/difficult', [ReadDifficultController::class, 'update'])->middleware('request.filter');
        Route::delete('/difficult/{id}', [ReadDifficultController::class, 'delete'])->middleware('request.filter');

        Route::post('/assembly', [ReadAssemblyController::class, 'index'])->middleware('request.filter');
        Route::put('/assembly/batch', [ReadAssemblyController::class, 'batch'])->middleware('request.filter');
        Route::put('/assembly', [ReadAssemblyController::class, 'store'])->middleware('request.filter');
        Route::patch('/assembly', [ReadAssemblyController::class, 'update'])->middleware('request.filter');
        Route::delete('/assembly/{id}', [ReadAssemblyController::class, 'delete'])->middleware('request.filter');

        Route::post('/quality', [ReadQualityController::class, 'index'])->middleware('request.filter');
        Route::put('/quality/batch', [ReadQualityController::class, 'batch'])->middleware('request.filter');
        Route::put('/quality', [ReadQualityController::class, 'store'])->middleware('request.filter');
        Route::patch('/quality', [ReadQualityController::class, 'update'])->middleware('request.filter');
        Route::delete('/quality/{id}', [ReadQualityController::class, 'delete'])->middleware('request.filter');

        Route::post('/precede', [ReadPrecedeController::class, 'index'])->middleware('request.filter');
        Route::put('/precede/batch', [ReadPrecedeController::class, 'batch'])->middleware('request.filter');
        Route::put('/precede', [ReadPrecedeController::class, 'store'])->middleware('request.filter');
        Route::patch('/precede', [ReadPrecedeController::class, 'update'])->middleware('request.filter');
        Route::delete('/precede/{id}', [ReadPrecedeController::class, 'delete'])->middleware('request.filter');
    });
});